package cn.jboa.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.sql.Time;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Entity
@Table(name = "BIZ_CLAIM_VOUCHER", schema = "SCOTT", catalog = "")
public class BizClaimVoucher {
    private Long id;
    private Date createTime;
    private String event;
    private long totalAccount;
    private String status;
    private Date modifyTime;
    private SysEmployee creator;
    private SysEmployee nextDeal;

    private List<BizClaimVoucherDetail> detailList = new ArrayList<BizClaimVoucherDetail>();
    private List<BizCheckResult> checkResultList = new ArrayList<BizCheckResult>();

    @OneToMany(mappedBy = "bizClaimVoucher",cascade = {CascadeType.ALL})
       public List<BizClaimVoucherDetail> getDetailList() {
           return detailList;
       }

       public void setDetailList(List<BizClaimVoucherDetail> detailList) {
           this.detailList = detailList;
       }

       @OneToMany(mappedBy = "checkEmployee",cascade = {CascadeType.ALL})
       public List<BizCheckResult> getCheckResultList() {
           return checkResultList;
    }

    public void setCheckResultList(List<BizCheckResult> checkResultList) {
        this.checkResultList = checkResultList;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="next_deal_sn")
    public SysEmployee getNextDeal() {
        return nextDeal;
    }

    public void setNextDeal(SysEmployee nextDeal) {
        this.nextDeal = nextDeal;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="create_sn")
    public SysEmployee getCreator() {
        return creator;
    }

    public void setCreator(SysEmployee creator) {
        this.creator = creator;
    }

    @Id
    @Column(name = "ID")
    @GenericGenerator(name="incrementName",strategy="increment")
    @GeneratedValue(generator="incrementName")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "EVENT")
    public String getEvent() {
        return event;
    }

    public void setEvent(String event) {
        this.event = event;
    }

    @Basic
    @Column(name = "TOTAL_ACCOUNT")
    public long getTotalAccount() {
        return totalAccount;
    }

    public void setTotalAccount(long totalAccount) {
        this.totalAccount = totalAccount;
    }

    @Basic
    @Column(name = "STATUS")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "MODIFY_TIME")
    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }


}
